using System;
using System.Collections.Generic;
using System.Linq;

public class Brand
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public class SupplierService
{
    // 模拟从数据库获取品牌信息
    private List<Brand> getBrands(string name = null)
    {
        var allBrands = new List<Brand>
        {
            new Brand { Id = 2012, Name = "Active Motif" },
            new Brand { Id = 2013, Name = "Allcells" },
            new Brand { Id = 2014, Name = "Abcam" },
            new Brand { Id = 2015, Name = "Bio-Rad" },
            new Brand { Id = 2016, Name = "Sigma-Aldrich" }
        };

        if (string.IsNullOrEmpty(name))
        {
            return allBrands;
        }
        else
        {
            return allBrands.Where(b => b.Name.Contains(name, StringComparison.OrdinalIgnoreCase)).ToList();
        }
    }

    public List<Brand> QueryBrands(string name = null)
    {
        return getBrands(name);
    }
}